<template>
  <div class="home">
    <img alt="Vue logo" src="../assets/logo.png">
    用户名：<input v-model="uname"><br>
    密码：<input type="password" v-model="upwd"><br>
    <button @clink="login"> 登录</button>
  </div>
</template>

<script>
import {mapActions} from 'vuex'

export default {
  name: 'Home',
  data(){
    return {
      uname:"digding",
      upwd:"123456"
    }
  },
  methods:{
    myLogin(){
      this.login({
      uname:this.uname,
      upwd:this.upwd
      })
    },
    ...mapActions([
      "login"
    ])
  }
}
</script>
